package cate.game.role.res.spicecall.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBSpiceCall;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "占星领取 の 请求")
@OperationSetter(GDOperation.SPICE_REWARD)
public class SpiceCallGetRewardReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult r = cc.getRole().getRes().spiceCall.getReward();
        if (!r.ok()) {
            game.notice.message(cc.getRole(), r.message);
        }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBSpiceCall.GET_REWARD_REQ;
    }
}
